package com.buddies.lottery.data;

import android.text.TextUtils;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by liuleigang on 2018/3/9.
 */

public class BusEvent {

    private int type;
    private Map<String, Object> params;

    public BusEvent(int eventType) {
        this.type = eventType;
        this.params = new HashMap<>();
    }

    public void addParam(String key, Object value) {
        if (!TextUtils.isEmpty(key)) {
            params.put(key, value);
        }
    }

    public Object getParam(String key) {
        if (!TextUtils.isEmpty(key)) {
            return params.get(key);
        }
        return null;
    }

    public int getEventType() {
        return type;
    }

}
